<template>
    <div id="divvvs" style="width: 100%;height:30vh;"></div>
</template>
<script setup lang="ts">
import {onMounted} from 'vue'
import * as echarts from 'echarts';

onMounted(()=>{
 var myChart = echarts.init(document.getElementById('divvvs'));
  window.addEventListener('resize', function() {
    myChart.resize();
  });
type EChartsOption = echarts.EChartsOption;

var chartDom = document.getElementById('divvvs')!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
option = {
  
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    }
  },
  legend: {},
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: {
    type: 'value',
    boundaryGap: [0, 0.01]
  },
  yAxis: {
    type: 'category',
    data: ['上海', '天津', '重庆', '广东', '广西', '浙江']
  },
  series: [
    {
   
      type: 'bar',
      data: [23542, 1235, 29034, 104970, 131744, 22141]
    },
    {
   
      type: 'bar',
      data: [39325, 23438, 31000, 121594, 134141, 22141]
    },
    {
     
      type: 'bar',
      data: [19325, 23438, 31000, 121594, 134141, 22141]
    }
  ]
};


option && myChart.setOption(option);


})

</script>